home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / clalsd.z / clalsd
Encoding:
Text File  |  2002-10-03  |  6.4 KB  |  199 lines

  1.  
  2.  
  3.  
  4. CCCCLLLLAAAALLLLSSSSDDDD((((3333SSSS))))                                                          CCCCLLLLAAAALLLLSSSSDDDD((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      CLALSD - use the singular value decomposition of A to solve the least
  10.      squares problem of finding X to minimize the Euclidean norm of each
  11.      column of A*X-B, where A is N-by-N upper bidiagonal, and X and B are N-
  12.      by-NRHS
  13.  
  14. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  15.      SUBROUTINE CLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND, RANK,
  16.                         WORK, RWORK, IWORK, INFO )
  17.  
  18.          CHARACTER      UPLO
  19.  
  20.          INTEGER        INFO, LDB, N, NRHS, RANK, SMLSIZ
  21.  
  22.          REAL           RCOND
  23.  
  24.          INTEGER        IWORK( * )
  25.  
  26.          REAL           D( * ), E( * ), RWORK( * )
  27.  
  28.          COMPLEX        B( LDB, * ), WORK( * )
  29.  
  30. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  31.      These routines are part of the SCSL Scientific Library and can be loaded
  32.      using either the -lscs or the -lscs_mp option.  The -lscs_mp option
  33.      directs the linker to use the multi-processor version of the library.
  34.  
  35.      When linking to SCSL with -lscs or -lscs_mp, the default integer size is
  36.      4 bytes (32 bits). Another version of SCSL is available in which integers
  37.      are 8 bytes (64 bits).  This version allows the user access to larger
  38.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  39.      by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use
  40.      only one of the two versions; 4-byte integer and 8-byte integer library
  41.      calls cannot be mixed.
  42.  
  43. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  44.      CLALSD uses the singular value decomposition of A to solve the least
  45.      squares problem of finding X to minimize the Euclidean norm of each
  46.      column of A*X-B, where A is N-by-N upper bidiagonal, and X and B are N-
  47.      by-NRHS. The solution X overwrites B. The singular values of A smaller
  48.      than RCOND times the largest singular value are treated as zero in
  49.      solving the least squares problem; in this case a minimum norm solution
  50.      is returned.  The actual singular values are returned in D in ascending
  51.      order.
  52.  
  53.      This code makes very mild assumptions about floating point arithmetic. It
  54.      will work on machines with a guard digit in add/subtract, or on those
  55.      binary machines without guard digits which subtract like the Cray XMP,
  56.      Cray YMP, Cray C 90, or Cray 2.  It could conceivably fail on hexadecimal
  57.      or decimal machines without guard digits, but we know of none.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CCCCLLLLAAAALLLLSSSSDDDD((((3333SSSS))))                                                          CCCCLLLLAAAALLLLSSSSDDDD((((3333SSSS))))
  71.  
  72.  
  73.  
  74. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  75.      UPLO   (input) CHARACTER*1
  76.             = 'U': D and E define an upper bidiagonal matrix.
  77.             = 'L': D and E define a  lower bidiagonal matrix.
  78.  
  79.             SMLSIZ (input) INTEGER The maximum size of the subproblems at the
  80.             bottom of the computation tree.
  81.  
  82.      N      (input) INTEGER
  83.             The dimension of the  bidiagonal matrix.  N >= 0.
  84.  
  85.      NRHS   (input) INTEGER
  86.             The number of columns of B. NRHS must be at least 1.
  87.  
  88.      D      (input/output) REAL array, dimension (N)
  89.             On entry D contains the main diagonal of the bidiagonal matrix. On
  90.             exit, if INFO = 0, D contains its singular values.
  91.  
  92.      E      (input) REAL array, dimension (N-1)
  93.             Contains the super-diagonal entries of the bidiagonal matrix.  On
  94.             exit, E has been destroyed.
  95.  
  96.      B      (input/output) COMPLEX array, dimension (LDB,NRHS)
  97.             On input, B contains the right hand sides of the least squares
  98.             problem. On output, B contains the solution X.
  99.  
  100.      LDB    (input) INTEGER
  101.             The leading dimension of B in the calling subprogram.  LDB must be
  102.             at least max(1,N).
  103.  
  104.      RCOND  (input) REAL
  105.             The singular values of A less than or equal to RCOND times the
  106.             largest singular value are treated as zero in solving the least
  107.             squares problem. If RCOND is negative, machine precision is used
  108.             instead.  For example, if diag(S)*X=B were the least squares
  109.             problem, where diag(S) is a diagonal matrix of singular values,
  110.             the solution would be X(i) = B(i) / S(i) if S(i) is greater than
  111.             RCOND*max(S), and X(i) = 0 if S(i) is less than or equal to
  112.             RCOND*max(S).
  113.  
  114.      RANK   (output) INTEGER
  115.             The number of singular values of A greater than RCOND times the
  116.             largest singular value.
  117.  
  118.      WORK   (workspace) COMPLEX array, dimension at least
  119.             (N * NRHS).
  120.  
  121.      RWORK  (workspace) REAL array, dimension at least
  122.             (9*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS + (SMLSIZ+1)**2),
  123.             where NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CCCCLLLLAAAALLLLSSSSDDDD((((3333SSSS))))                                                          CCCCLLLLAAAALLLLSSSSDDDD((((3333SSSS))))
  137.  
  138.  
  139.  
  140.      IWORK  (workspace) INTEGER array, dimension at least
  141.             (3*N*NLVL + 11*N).
  142.  
  143.      INFO   (output) INTEGER
  144.             = 0:  successful exit.
  145.             < 0:  if INFO = -i, the i-th argument had an illegal value.
  146.             > 0:  The algorithm failed to compute an singular value while
  147.             working on the submatrix lying in rows and columns INFO/(N+1)
  148.             through MOD(INFO,N+1).
  149.  
  150. FFFFUUUURRRRTTTTHHHHEEEERRRR DDDDEEEETTTTAAAAIIIILLLLSSSS
  151.      Based on contributions by
  152.         Ming Gu and Ren-Cang Li, Computer Science Division, University of
  153.           California at Berkeley, USA
  154.         Osni Marques, LBNL/NERSC, USA
  155.  
  156.  
  157. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  158.      INTRO_LAPACK(3S), INTRO_SCSL(3S)
  159.  
  160.      This man page is available only online.
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.